const Column = require('../../models/blog_column');

const ControllerHeader = {
    getColumnList: async function (req, res, next) {
        try {

            // orderBy方法进行排序
            const list = await Column.select({ display: 1 }).orderBy('sort');

            res.json({ code: 200, msg: '链接成功', data: list })
        } catch (e) {
            res.json({ code: 0, data: e })
        }
    }
}

module.exports = ControllerHeader;